home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Franz PD / Franz PD Disk #116 (1991-03)(Amiga User Group Deutschland e.V.).zip / Franz PD Disk #116 (1991-03)(Amiga User Group Deutschland e.V.).adf / G-ALERT / SOURCE.S < prev    next >
Text File  |  1989-07-03  |  3KB  |  190 lines

  1. execbase      = 4
  2. openlib       = -552
  3. closelib      = -414
  4. displayalert  = -090
  5. allocmem      = -198
  6. freemem       = -210
  7. getmsg        = -372
  8. waitport      = -384
  9. findtask      = -294
  10. replymsg      = -378
  11. ;
  12. movem.l    d1-d7/a0-a6,-(a7)
  13. move.l    execbase,a6
  14. move.l    #0,a1
  15. jsr    findtask(a6)
  16. move.l    d0,a2
  17. move.l    #0,starts
  18. tst.l    $ac(a2)
  19. bne    fromcli
  20. lea    $5c(a2),a0
  21. jsr    waitport(a6)
  22. lea    $5c(a2),a0
  23. jsr    getmsg(a6)
  24. move.l    d0,starts
  25. fromcli:
  26. bsr    openint
  27. beq    ende1
  28. bsr    memorye
  29. beq    ende2
  30. bsr    makealert
  31. ;
  32. move.l    intbase,a6
  33. moveq    #0,d0
  34. move.l    alert,a0
  35. lea    gfx+4,a1
  36. move.l    (a1),d1
  37. mulu    #2,d1
  38. add.l    #11,d1
  39. jsr    displayalert(a6)
  40. ;
  41. bsr    memorya
  42. ende2:
  43. bsr    closeint
  44. ende1:
  45. moveq    #0,d0
  46. cmp.l    #0,starts
  47. beq    nowb
  48. move.l    execbase,a6
  49. move.l    starts,a1
  50. jsr    replymsg(a6)
  51. moveq    #2,d0
  52. nowb:
  53. movem.l    (a7)+,d1-d7/a0-a6
  54. rts
  55. ;
  56. openint:
  57. move.l    execbase,a6
  58. lea    intname,a1
  59. moveq    #0,d0
  60. jsr    openlib(a6)
  61. move.l    d0,intbase
  62. rts
  63. ;
  64. memorye:
  65. lea    gfx+12,a0
  66. moveq    #0,d0
  67. loop1:
  68. move.b    (a0)+,d1
  69. cmp.b    #"1",d1
  70. bne    keins
  71. add.l    #6,d0
  72. keins:
  73. cmp.b    #0,d1
  74. bne    loop1
  75. mulu    #2,d0
  76. add.l    #atexe-atexa,d0
  77. move.l    d0,size
  78. moveq    #3,d1
  79. move.l    execbase,a6
  80. jsr    allocmem(a6)
  81. move.l    d0,alert
  82. rts
  83. ;
  84. memorya:
  85. move.l    execbase,a6
  86. move.l    alert,a1
  87. move.l    size,d0
  88. jsr    freemem(a6)
  89. rts
  90. ;
  91. closeint:
  92. move.l    execbase,a6
  93. move.l    intbase,a1
  94. jsr    closelib(a6)
  95. rts
  96. ;
  97. makealert:
  98. move.l    alert,a5
  99. lea    gfx,a4
  100. move.l    (a4)+,d2
  101. move.l    (a4)+,d3
  102. move.l    (a4)+,d6
  103. sub.l    #1,d2
  104. sub.l    #1,d3
  105. move.l    d2,d5
  106. moveq    #6,d1
  107. loop2:
  108. move.l    d5,d2
  109. move.l    d6,d0
  110. loop3:
  111. move.b    (a4)+,d4
  112. cmp.b    #" ",d4
  113. beq    schit
  114. move    d0,(a5)+
  115. move.b    d1,(a5)+
  116. move.b    #".",(a5)+
  117. move    #1,(a5)+
  118. schit:
  119. add.l    #2,d0
  120. dbra    d2,loop3
  121. add.l    #2,d1
  122. dbra    d3,loop2
  123. lea    gfx,a4
  124. move.l    (a4)+,d2
  125. move.l    (a4)+,d3
  126. move.l    (a4)+,d6
  127. sub.l    #1,d2
  128. sub.l    #1,d3
  129. move.l    d2,d5
  130. moveq    #6,d1
  131. loop4:
  132. move.l    d5,d2
  133. move.l    d6,d0
  134. add.l    #540,d0
  135. loop5:
  136. move.b    (a4)+,d4
  137. cmp.b    #" ",d4
  138. beq    schit2
  139. move    d0,(a5)+
  140. move.b    d1,(a5)+
  141. move.b    #".",(a5)+
  142. move    #1,(a5)+
  143. schit2:
  144. add.l    #2,d0
  145. dbra    d2,loop5
  146. add.l    #2,d1
  147. dbra    d3,loop4
  148. lea    atexa,a4
  149. move.l    #atexe-atexa-1,d0
  150. copy:
  151. move.b    (a4)+,(a5)+
  152. dbra    d0,copy
  153. rts
  154. ;
  155. starts:        dc.l 0
  156. size:        dc.l 0
  157. alert:        dc.l 0
  158. intbase:    dc.l 0
  159. intname:    dc.b "intuition.library",0
  160. ;
  161. gfx:
  162. dc.l    27,18,20        ; < X-SIZE >,< Y-SIZE >,< X-KORD >
  163. dc.b    "    111111       111111    "
  164. dc.b    "  1111111111   111   1111  "
  165. dc.b    " 111111111111 11111   1111 "
  166. dc.b    " 111111111111 1111111  111 "
  167. dc.b    "1111111111111111111111  111"
  168. dc.b    "1111111111111111111111  111"
  169. dc.b    "1111111111111111111111  111"
  170. dc.b    "1111111111111111111111  111"
  171. dc.b    "111111111111111111111  1111"
  172. dc.b    " 11111111111111111111  111 "
  173. dc.b    " 1111111111111111111  1111 "
  174. dc.b    "  111111111111111111 1111  "
  175. dc.b    "   111111111111111111111   "
  176. dc.b    "    1111111111111111111    "
  177. dc.b    "      111111111111111      "
  178. dc.b    "        11111111111        "
  179. dc.b    "          1111111          "
  180. dc.b    "            111            "
  181. dc.b     0
  182. atexa:
  183. dc.b    0,218,20,"If you love multitasking ,",0,1
  184. dc.b    0,202,28,"please don´t use the DMA´s ...",0,1
  185. dc.b    2,40,36,".",0,1,2,42,36,".",0,1,2,44,36,".",0,1
  186. dc.b    2,46,36,".",0,1,2,48,36,".",0,1,2,50,36,".",0,1
  187. dc.b    2,42,38,".",0,1,2,42,40,".",0,1,2,50,38,".",0,1
  188. dc.b    2,48,40,".",0,1,2,46,40,".",0,0,2,44,36,".",0,1
  189. atexe:
  190.